<!--继承模板-->
{% extends 'layout.html' %}

<!--重写模块-->
{% block main%}
    <ol class="breadcrumb">
        <li><a href="/admin">管理首页</a></li>
        <li><span>用户列表</span></a></li>
    </ol>
    <h3>用户列表</h3>
    <!--包含模板-->
    {% include 'page.html' %}
    <!---->
    <table class="table table-hover table-bordered table-striped">
        <tr>
            <th>ID</th>
            <th>用户名</th>
            <th>密码</th>
            <th>是否为管理员</th>
        </tr>
        {% for user in users %}
            <tr>
                <td>{{user._id.toString()}}</td>
                <td>{{user.username}}</td>
                <td>{{user.password}}</td>
                <td>
                    {% if user.isAdmin %}是
                    {% else %}否
                    {%endif%}
                </td>
            </tr>
        {% endfor %}
    </table>
    <!--包含模板-->
    {% include 'page.html' %}
    <!---->
{% endblock %}